home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PBLIB1
/
UTILS01.TXT
< prev
Wrap
Text File
|
1994-05-02
|
7KB
|
126 lines
FREE Utility Programs with source
Howard Richoux CServe 76350,1772
May 2, 1994
The concept I am trying to push is the cooperative creation
and maintenance of a comprehensive TP7 DOS code library. Maybe the
way to convince people of the need is to demonstrate its usefulness.
I am packaging up a group of utility programs I have written. These are
now PUBLIC DOMAIN (even though many still list a copyright to HNR Software).
Caveat - Many of these "just grew" and are still growing. I use
them until they don't do what I want then I improve them, or start over.
Source for everything is bundled into the CServe PUBLIB.ZIP in the GENERAL
section. If you want to experiment with public domain library concepts, or
play with modifying these utilities, down-load and have fun. Hopefully, in
the next few weeks, a true PUBLIB V1.00 can be constructed with reasonably
permanent structure and naming. This should be the real starting point
for coding.
In the mean time, these EXE files and accompanying (sparse) documentation
will serve as a useful concept prover.
One last caveat - I didn't say these were small - just useful. For
example, the DDIR.EXE program is 24k replacing a DDIR.com I had been using
which was under 1k. But somebody else owned that one, there are real or
imagined restrictions on my re-distributing of it, and if it didn't exactly
fit my desires, I couldn't change it. Disk space is getting very cheap these
days, and 24k loads and runs as quickly as 1k.
In the current library version, special printer options produce HPCL
escape sequences, rather than any dot matrix sequences. This should be
generalized when we move to PUBLIB V1.00 This applies to COMPRESSED
and LANDSCAPE options.
1. DDIR - the old DoubleDirectory. Sorts file names alphabetically, lists
two to a row. When OUT=LPT1, printing uses whole column length.
DDIR(cr) shows current directory
DDIR <dirspec> shows <dirspec> directory
Special cases - DDIR p(cr) (or P, or DDIR <dirspec> p(cr) )
causes output to go to LPT1:(equiv OUT=LPT1)
If config parameter COMPRESSED=YES then DDIR produces 3 columns
per line.
2. DIRS - produces a dump of first level subdirectories sorted
alphabetically, with number of files found, total size and latest
file date. These numbers include lower level subdirectories. This
is useful in deciding what to kick off the disk to make room.
Useful DIRS p(cr) to go to printer.
3. FIND - the old findfile idea, like FIND *.pas or FIND ab?de.*
Note the batch file BIGFILES.BAT. This uses a couple of
parameters to change the operation into a search for files
greater than a threshhold.
4. README - A simple text file viewer. Lets you pick files to look
at and you can page through them. Ctrl-PrintScreen lets you
print the whole file.
5. DUMP - HEX file dump utility. Options to designate a file header
size and record size to help decode mystery files. Options
to view only some records. See dump.doc
6. COMPILE - TPCs a list of files (compile.cmd), checking to see if
tpu or exe is produced. After all done, goes back and compiles
the first one that failed so that you can see the error. I use
this a lot when I make global changes to the libraries to catch
missed references.
7. TLISTER - My primary textfile --> printer program. As configured,
(tlister.cfg below).
{TLISTER.CFG - configuration settings, place with TLISTER.EXE}
{ if param not present, defaults are used }
OFFSET=6 {left pad blanks def. 6 }
OUT=LPT1 {set output to LPT1: def. CON }
COMPRESSED=YES {set 132 col 8 lpi def. NO }
{can be overridden on param line}
this takes a text file and sends it to LPT1 compressed mode(HPCL)
with a left margin of 6 chars added and a simple header. It can
handle an input spec of *.xxx to list a bunch of files. Input file
extension defaults to .pas. See TLISTER.doc for a little more.
8. TPRINT - flexible text file to printer program - do >TPRINT TPRINT.doc
9. USES either USES <*> or USES <unitname> - scans *.pas for unit source
and lists out USES statement. Good for checking who uses what.
10.TMAP not too great program to analyse Pascal .MAP files.
11.READSECT - nearly trivial exercise of HELPSTUF library code. Just
type readsect and you get windowed random access viewing of
the test.txt file. This is primarily to show what can be done
rather than be useful in itself.
12 SORTSECT - comparable to READSECT, sorts a text file which has been
divided into sections.
13&14 ZIP and PUT - Together, these are my backup utilities. I find the
structure very pleasing - others may completely object. Step 1
get and register PKZIP. This has been an extremely useful
utility for years and only gets better. I have a directory on
C: named \ZIP where I keep archives until I move them to floppy.
The ZIP program simply invokes PKZIP to copy and compress the
current directory to \ZIP with the directory name as the ZIP name.
I configure ZIP to erase *.bak and *.tmp first to clean things up some.
This only takes a few seconds, so I can do it frequently, replacing
the prior backup. I do this maybe 5 or 10 times an hour during
development, and immediatly after successful changes to the libraries.
PUT is configured to copy from \ZIP to the B: floppy, but
only actually copying files which have changed on \ZIP. ZIP and PUT
are tuned to my individual taste, but between the CFG file options
and changing a little code, I'm sure most people can be satisfied.
I am much more relaxed when I have lots of backup copies on floppy.
This is enough for now. The XBASE utility deserves more specific
documentation. If you are in desparate need of XBASE stuff, drop me a msg.
I have code generators for dbf and dbt objects and binary file objects -
associated with objects in publib.
I really need to know what people need and have to share.